<%@ page pageEncoding="UTF-8" contentType="text/html; UTF-8" %>
<!DOCTYPE html>
<%
	String path = request.getContextPath ();
	String basePath = request.getScheme () + "://" + request.getServerName () + ":" + request.getServerPort () + path + "/";
%>
<head>
	<base href="<%=basePath%>">
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
		<link href="css/index.css" type="text/css" rel="stylesheet">
		<script>
			function show_code() {
				$("#code").attr("src", "/CodeServlet?i=" + Math.random());
			}
			var code_random = '${str}';
			if (code_random != 'null') {
				alert(code_random)
			}
		</script>
	</head>
	<body>
		<div class="header">
			欢迎来到希尔顿酒店系统
		</div>
		<div class="middle">
			<div class="dz">
				<span class="login">登录 &nbsp;|</span>
				<span class="res">注册</span>
			</div>
			<form action="/login.do" method="post" class="form1">
				<p>用户名：<input type="text" name="username"  /></p>
				<p>密码<span>：</span><input type="text" name="password"  /></p>
				<p>验证码：<input type="text" value="" name="code_random" id="code_random"/></p>
				<p class="code-random"><img id="code" src="CodeServlet"/>
					<a href="javascript:void(0) ;" onclick="show_code()"
					   style="font-size:12px; font-family:'宋体';">换一张</a>
				</p>
				<input class="loginbutton" type="submit" value="登录">
				<p class="help"><a  href="help.jsp" style="text-decoration: none;color: gray;">帮助中心</a></p>
				<p class="find"><a  href="findPassword.jsp" style="text-decoration: none;color: gray">找回密码</a></p>
			</form>
			<form action="reManager.jsp" method="get" class="form2">
				<!-- <p class="que">用户名<span>：</span><input type="text" name="username"  /></p>
				<p class="que">电话号码<span>：</span><input type="text" name="phone"  /></p>
				<p>密码<span>：</span><input type="text" name="password"  /></p>
				<p class="que">确认密码<span>：</span><input type="text" name="password"  /></p>
				<p class="sex">性别<input type="radio" name="sex"  value="男" checked/>男
				<input type="radio" name="sex"  value="女"/>女</p>
				<p class="que">邮箱地址<span>：</span><input type="email" name="email"/></p>
				<input class="registerbutton" type="submit" value="注册"> -->
				<table>
					<tr>
						<td>用户名:</td>
						<td><input type="text" name="username"  /></td>
					</tr>
					<tr>
						<td>电话号码:</td>
						<td><input type="text" name="phone"  /></td>
					</tr>	
					<tr>
						<td>密码:</td>
						<td><input type="password" name="password"  /></td>
					</tr>	
					<tr>
						<td>确认密码:</td>
						<td><input type="password" name="password"  /></td>
					</tr>	
					<tr>
						<td>性别:</td>
						<td><input type="radio" name="sex"  value="男" checked/>男
				<input type="radio" name="sex"  value="女"/>女</td>
					</tr>
					<tr>
						<td>邮箱地址:</td>
						<td><input type="email" name="email"  /></td>
					</tr>
				</table>
				<input class="registerbutton" type="submit" value="注册">
			</form>
		</div>
		
		<script type="text/javascript">
			$(".login").click(function(){
				$(".form1").show()
				$(".form2").hide()
			})
			$(".res").click(function(){
				$(".form2").show()
				$(".form1").hide()
			})
		</script>
	</body>
</html>
